#include "qperson.h"

QPerson::QPerson(QString name, QObject *parent) : QObject(parent)
{
    m_name = name;
}

unsigned QPerson::age()
{
    return m_age;
}

void QPerson::setAge(unsigned value)
{
    if (m_age == value)
        return;
    m_age = value;
    emit ageChanged(m_age);
}

void QPerson::incAge()
{
    m_age++;
    emit ageChanged(m_age);
}
